/*
 * ApplicationLayer.h
 *
 *  @author John Manero (jmanero@wpi.edu)
 *  @version April 11, 2012
 */

#ifndef APPLICATIONLAYER_H_
#define APPLICATIONLAYER_H_

#include <queue>
#include <pthread.h>
using std::queue;

#include "common.h"
#include "Packet.h"
#include "DataLinkLayer.h"

extern queue<Packet *> sendPktQ, recvPktQ;
extern pthread_mutex_t sendPktM, recvPktM;

class ApplicationLayer {
public:
	ApplicationLayer(bool);
	void run();
	virtual ~ApplicationLayer();

private:
	int sockId;
	void sendData();
	void receiveData();
};

#endif /* APPLICATIONLAYER_H_ */
